import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'dva';
import { Button, Select } from 'antd';
const Option = Select.Option;

const SelectHG = ({ app,dispatch,fun }) => {
    return(
        <Select defaultValue="商户名称" style={{ width: 150, margin: 10 }} showSearch onChange={
            value=>fun(value)}>
            <Option value="">全部</Option>
            {
                app.bussidName && app.bussidName.map(item =>{
                    return <Option key={item.busid} value={item.name}>{item.name}</Option>;
                })
            }
        </Select>
    );
};


SelectHG.propTypes = {
    app: PropTypes.object,
    loading: PropTypes.object,
    dispatch: PropTypes.func,
};
export default connect(({ app, loading }) => ({ app, loading }))(SelectHG);